import { PayloadAction, createSlice, Action } from '@reduxjs/toolkit';
import { ToolkitStore } from '@reduxjs/toolkit/dist/configureStore';
import { AppStore } from '../types';

const startUpSlice = createSlice({
  name: 'startUp',
  initialState: 'noRequest',
  reducers: {
    startUp: (state: string, action: PayloadAction<string>) => {
      state = action.payload;
      return state;
    },
  },
});

export const { startUp } = startUpSlice.actions;
export default startUpSlice.reducer;

export const startUpEffect = {
  'startUp/startUp': async (store: ToolkitStore<AppStore>, action: Action) => {},
};
